﻿#include "ex01.h"
#include "ex02.h"
#include "ex03.h"
#include "ex04.h"
#include "ex05.h"
#include "ex06.h"
#include "ex07.h"



#define MESSAGE "\n数值分析习题，请输入习题编号：\n0、退出系统；\n1、用Romberg方法计算积分；\n2、迭代法求解非线性方程；\n\
3、初值问题数值解；\n\
4、三次插值；\n\
5、最小二乘拟合；\n\
6、列主元法求线性方程组；\n\
7、雅可比迭代法求线性方程组；\n"

#include <iostream>
using namespace std;

int main()
{
		char selectFromUser = '\0';
		while (selectFromUser != '0')
		{
			if (selectFromUser != '\n')
			{
				printf(MESSAGE);
			}

			selectFromUser = getchar();
			switch (selectFromUser)
			{
			case '1':
				cout << "问题："<<PROBLEM_DES01;
				ex01();
				break;
			case '2':
				cout << "问题：" << PROBLEM_DES02;
				ex02();
				break;

			case '3':
				cout << "问题：" << PROBLEM_DES03;
				ex03();
				break;
			case '4':
				cout << "问题：" << PROBLEM_DES04;
				ex04();
				break;
			case '5':
				cout << "问题：" << PROBLEM_DES05;
				ex05();
				break;
			case '6':
				cout << "问题：" << PROBLEM_DES06;
				ex06();
				break;
			case '7':
				cout << "问题：" << PROBLEM_DES07;
				ex07();
				break;
			default:
				break;
			}


		}


	
}

